﻿using System;
using System.IO;
class Program
{
    static void Main()
    {
        StreamReader reader = new StreamReader("../../test.txt");
        using (reader)
        {
            int lineNum = 1;
            string line = String.Empty;
            while (line != null)
            {
                if (lineNum % 2 != 0)
                {
                    try
                    {
                        line = reader.ReadLine();
                        Console.WriteLine("odd line {0} is: {1}", lineNum, line);
                    }
                    catch (ArgumentNullException)
                    {
                        Console.WriteLine("file is empty");
                        reader.Close();
                    }
                    catch (IOException)
                    {
                        Console.WriteLine("file is not reachable");
                        reader.Close();
                    }
                }
                else
                {
                    line = reader.ReadLine();
                }
                lineNum++;
            }
        }
        reader.Close();
        Console.ReadLine();
    }
}

